﻿#ifndef CLOCK_H
#define CLOCK_H

#include <QObject>
#include <QDateTime>
#include <QTimer>
#include "bellrings.h"
enum REPEAT{
    ONCE = 1,MON = 1<<1,TUE = 1<<2,WED = 1<<3,THU = 1<<4,FRI = 1<<5,SAT = 1<<6,SUN = 1<<7
};

class Clock {
private:
    QTime time;//时间
    QString name,description;//名称，描述
    BellRings bellRing;//铃声
    QTimer timer;
    REPEAT repeat;//重复A
public:
    Clock(QString name,QString description,QTime time,BellRings bellring = DEFAULT);
    Clock();
    Clock(const Clock &clock);
    void operator=(const Clock&clock);
    const QTime &getTime() const;
    void setTime(const QTime &newTime);

    const QString &getName() const;
    void setName(const QString &newName);

    const QString &getDescription() const;
    void setDescription(const QString &newDescription);
    int getRepeat()const ;
    void addRepeat(REPEAT v);
    void deleteRepeat(REPEAT v);
    void setRepeat(REPEAT v);
};

#endif // CLOCK_H
